package com.wnx.job.component;


import com.wnx.job.modules.pms.model.PmsTag;
import org.apache.commons.lang3.StringUtils;
import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;

/*
*
 * @author by wangnaixing
 * @Description
 * @Date 2021/12/19 15:56

*/

@Component
public class TagByNameConverter implements Converter<String, PmsTag> {
    @Override
    public PmsTag convert(String name) {
        if (StringUtils.isNotBlank(name)){return new PmsTag(name);}
        return null;
    }

}
